package com.leps.nq.bu.controller;

import com.leps.nq.bu.mapper.CustAreaStationTreeMapper;
import com.leps.nq.bu.vo.CustTreeVo;
import com.leps.nq.common.vo.R;
import com.leps.nq.common.vo.RBuilder;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "客户>区块>平台树形数据接口")
public class CustAreaStationTreeController {

    @Autowired
    CustAreaStationTreeMapper mapper;

    @ApiOperation("获取客户>区块>平台树形数据")
    @GetMapping("/tree/cust-area-station")
    public R<List<CustTreeVo>> treenify() {
        List<CustTreeVo> tree = this.mapper.selectCustAreaStationTree();
        return RBuilder.ok(tree);
    }
}
